Layer

data class Layer(layerId: LayerId, parentLayerId: LayerId?, backendNodeId: BackendNodeId?, offsetX: Double, offsetY: Double, width: Double, height: Double, transform: List<Double>?, anchorX: Double?, anchorY: Double?, anchorZ: Double?, paintCount: Int, drawsContent: Boolean, invisible: Boolean?, scrollRects: List<ScrollRect>?, stickyPositionConstraint: StickyPositionConstraint?)

Information about a compositing layer.

Constructors

Layer
Link copied to clipboard
fun Layer(layerId: LayerId, parentLayerId: LayerId? = null, backendNodeId: BackendNodeId? = null, offsetX: Double, offsetY: Double, width: Double, height: Double, transform: List<Double>? = null, anchorX: Double? = null, anchorY: Double? = null, anchorZ: Double? = null, paintCount: Int, drawsContent: Boolean, invisible: Boolean? = null, scrollRects: List<ScrollRect>? = null, stickyPositionConstraint: StickyPositionConstraint? = null)

Properties

anchorX
Link copied to clipboard
val anchorX: Double? = null
Transform anchor point X, absent if no transform specified
anchorY
Link copied to clipboard
val anchorY: Double? = null
Transform anchor point Y, absent if no transform specified
anchorZ
Link copied to clipboard
val anchorZ: Double? = null
Transform anchor point Z, absent if no transform specified
backendNodeId
Link copied to clipboard
val backendNodeId: BackendNodeId? = null
The backend id for the node associated with this layer.
drawsContent
Link copied to clipboard
val drawsContent: Boolean
Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
height
Link copied to clipboard
val height: Double
Layer height.
invisible
Link copied to clipboard
val invisible: Boolean? = null
Set if layer is not visible.
layerId
Link copied to clipboard
val layerId: LayerId
The unique id for this layer.
offsetX
Link copied to clipboard
val offsetX: Double
Offset from parent layer, X coordinate.
offsetY
Link copied to clipboard
val offsetY: Double
Offset from parent layer, Y coordinate.
paintCount
Link copied to clipboard
val paintCount: Int
Indicates how many time this layer has painted.
parentLayerId
Link copied to clipboard
val parentLayerId: LayerId? = null
The id of parent (not present for root).
scrollRects
Link copied to clipboard
val scrollRects: List<ScrollRect>? = null
Rectangles scrolling on main thread only.
stickyPositionConstraint
Link copied to clipboard
val stickyPositionConstraint: StickyPositionConstraint? = null
Sticky position constraint information
transform
Link copied to clipboard
val transform: List<Double>? = null
Transformation matrix for layer, default is identity matrix
width
Link copied to clipboard
val width: Double
Layer width.

Sources

jvm source
Link copied to clipboard